scan.cpp